/**
 * Created with IntelliJ IDEA.
 * Description:
 */

import java.util.*;

public class Main {
    public static void main(String[] args) {
        int count = 0;
        Scanner scanner = new Scanner(System.in);

        //write your code here......
        while(scanner.hasNextInt()){
            int n = scanner.nextInt();
            if(n > 0){
                count++;
            }else{
                break;
            }
        }
        System.out.println(count);

    }
}
